const express = require('express');
const router = express.Router();
//引入数据库
const db = require('../utils/db')
/* 用户. */
router.get('/get', function(req, res) {
  const sql = 'select * from admin';
  db.query(sql,function (err,data){
    if(err){
      res.json({error:1,msg:err})
    }else {
      res.json({error:0,data:data})
    }
  })
});

module.exports = router;
